<template>
	<div class="baifangshenpi">
    	<div class="yy" v-for="(item,index) in list" :key="index" style="margin-bottom: 0.2rem;" @click="go('/baifang/xiangqing',item)">
        <div class="flexbc" style="border-bottom: 1px dashed #ddd;">
          <div style="font-weight: bold; margin-bottom: 0.2rem; font-size: 0.3rem;">{{item.dwmc}}</div>
          <div>
            <div style="color: #259b24; " v-if="item.spzt == 0">已审批</div>
            <div style="color: #1989fa; " v-if="item.spzt == 1">待审批</div>
            <div style="color: #f00; " v-if="item.spzt == 2">不通过</div>
          </div>
        </div>
    		<div class="flex" style="padding-top: 0.2rem;">
    			<div style="flex: 1; overflow: hidden;">
            <div style="color: #999; margin-bottom: 0.1rem;">被拜访人姓名</div>
            <div style="color: #666; margin-bottom: 0.2rem;">{{item.bbfrxm}}</div>

            <div style="color: #999; margin-bottom: 0.1rem;">被拜访人类型/拜访方式</div>
    				<div style="color: #333; margin-bottom: 0.2rem;">{{item.xlkh}}/{{item.bffs}}</div>
    				<!-- <div style="color: #666; font-size: 0.2rem;" ><span style="margin-right: 0.1rem;">{{item.xlkh}}</span>{{item.bffs}}</div> -->
    			</div>
    			<div style="flex: 1; overflow: hidden;">
    				<div style="color: #999; margin-bottom: 0.1rem;">销售负责人</div>
    				<div style="color: #666; margin-bottom: 0.2rem;">{{item.createname}}</div>

            <div style="color: #999; margin-bottom: 0.1rem;">创建时间</div>
            <div style="color: #666; margin-bottom: 0.2rem;">{{item.createtime}}</div>
    			</div>
    		</div>
      </div>
	</div>
</template>

<script>
  var h = document.documentElement.clientWidth / 7.5 + 'px';
      document.documentElement.style.fontSize = h;
	export default {
		name: 'baifangshenpi',
		data() {
			return {
        list:[],
        all:{
          fzrid:JSON.parse(localStorage.getItem('person')).userid,
        }
			}
		},
		created() {
      this.getlist()
		},
		mounted() {

		},
		methods: {

      go:function(path,item){
        this.$router.push({
          path:path,
          query:{
            id:item.id,
            shenpi:true
          }
        })
      },

      getlist:function(){

        axios.get('/Process/queryVisitProcessList',{params:this.all}).then((response)=>{
        	if (response.data.state == 200) {
            this.list = response.data.data
            this.$emit('huoqutiaoshu1',this.list.length)
        	} else {
            vant.Toast(response.data.msg);
        	}
        })
      }

		}
	}
</script>


<style scoped >



</style>
